<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>
      {% block title %}AppEngine{% endblock %}
   </title>
   <link href="/static/glike.css" rel="stylesheet"
         type="text/css" />
   

<style type="text/css">

/*#validEmail, #validInput1*/
.validInputclass{
	margin-top: 4px;
	margin-left: 9px;
	position: absolute;
	width: 16px;
	height: 16px;
	}
</style>


   <script type="text/javascript" 
           src="/static/js/jquery-1.4.2.min.js">
   </script>


<script type="text/javascript">

   //<![CDATA[

	function isValidEmailAddress(emailAddress) {
		var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
		return pattern.test(emailAddress);
	}
	
	function isEnoughCharacters(inputChars) {
		var pattern = new RegExp("[^a-zA-Z0-9_]");
		//var pattern = /[a-zA-Z0-9]/;
		return pattern.test(inputChars);
	}
	


$(document).ready(function() {
	 
$("#validate").keyup(function(){
var email = $("#validate").val();
	 
if(email != "")
{
if(isValidEmailAddress(email))
{
	 
$("#validEmail").css({ "background-image": "url('/static/images/validyes.png')" });
 
} else {
 
$("#validEmail").css({ "background-image": "url('/static/images/validno.png')" });
	 
}
 
} else {
 
$("#validEmail").css({ "background-image": "none" });
 
}
}); // einde S("#validate").keyup etc.

$("#validate2").keyup(function(){
var email = $("#validate2").val();
	 
if(email != "")
{
if(isEnoughCharacters(email))
{
	 
$("#validInput2").css({ "background-image": "url('/static/images/validno.png')" });
 
} else {
 
$("#validInput2").css({ "background-image": "url('/static/images/validyes.png')" });
	 
}
 
} else {
 
$("#validInput2").css({ "background-image": "none" });
 
}
}); // einde S("#validate").keyup etc.

$("#validate1").keyup(function(){
var email = $("#validate1").val();
	 
if(email != "")
{
if(isEnoughCharacters(email))
{
	 
$("#validInput1").css({ "background-image": "url('/static/images/validno.png')" });
 
} else {
 
$("#validInput1").css({ "background-image": "url('/static/images/validyes.png')" });
	 
}
 
} else {
 
$("#validInput1").css({ "background-image": "none" });
 
}
}); // einde S("#validate").keyup etc.


$("#password").keyup(function(){
var email = $("#password").val();
	 
if(email != "")
{
if(isEnoughCharacters(email))
{
	 
$("#validInput3").css({ "background-image": "url('/static/images/validno.png')" });
 
} else {
 
$("#validInput3").css({ "background-image": "url('/static/images/validyes.png')" });
	 
}
 
} else {
 
$("#validInput3").css({ "background-image": "none" });
 
}
}); // einde S("#validate").keyup etc.

}); // einde S(document).ready etc.


//]]> <!--einde CDATA -->
</script>



 </head>
 <body>
   <div id="header">
      <h1><a href="index.htm">App Engine</a></h1>
      <ul>
        <li><a href="sites.htm"
              {% ifequal path '/sites.htm' %}
                    class="selected"
              {% endifequal %}
             >Sites</a></li>
        <li><a href="topics.htm" 
              {% ifequal path '/topics.htm' %}
                    class="selected"
              {% endifequal %}
            >Topics</a></li>
      {% ifnotequal username None %}
        <li><a href="/chat"
              {% ifequal path '/chat' %}
                    class="selected"
              {% endifequal %}
            >Chat</a></li>
      {% endifnotequal %}
      {% ifnotequal username None %}
        <li><a href="/members"
              {% ifequal path '/members' %}
                    class="selected"
              {% endifequal %}
            >Members</a></li>
      {% endifnotequal %}
      {% ifequal username None %}
        <li><a href="/login"
              {% ifequal path '/login' %}
                    class="selected"
              {% endifequal %}
            >Login</a></li>
      {% else %}
        <li><a href="/logout">Logout ({{username}})</a></li>
      {% endifequal %}
      </ul>
   </div>
   <div id="bodycontent">
      {% block bodycontent %}
           Replace this
      {% endblock %}
   </div>

 </body>
</html>
